package com.zeroxml.cms.web.action;

import com.zeroxml.cms.web.action.admin.IndexAction;
import net.sourceforge.stripes.action.Before;
import net.sourceforge.stripes.action.RedirectResolution;
import net.sourceforge.stripes.action.Resolution;

/**
 * User: cjp
 * Date: 2007-9-9
 * Time: 20:31:01
 */
public class BaseAdminAction extends BaseAction {
    @Before
    public Resolution checkAdminLogin() {
        if (actionBeanContext.getRequest().getSession().getAttribute("admin") == null) {
            return new RedirectResolution(IndexAction.class);
        } else {
            return null;
        }
    }
}
